package dormatory;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

public class saveAObject {

	try {
		BufferedWriter writer = new BufferedWriter( new FileWriter(file));
		
	for (DormitoryRepositoryInMemoryImpl dorm:roomList) {
		writer.write(dorm.getName() + "/");
		writer.write(dorm.totalGuest() + "/");
		writer.write(dorm.bedsAvailable() + "/");
		}
	writer.close();
}
    catch (IOException ex) {
	System.out.println("couldn't write the dorm list fool!");
	ex.printStackTrace();
    }
    }
}

    

